<?php
/**
 * 单个话题接口
 */
require_once dirname(dirname(__DIR__))."/common.php";

use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\model\Statics;

//分类ID
$h5_name=isset($_REQUEST['h5_name']) ? trim($_REQUEST['h5_name']) : 'h5_1';

$suffix=rand(1,5);
//正式key
$key = REDIS_PREFIX."H5_statics_".$suffix;//这是入统计队列的key
//测试key
//$key = REDIS_PREFIX."test_H5_statics_".$suffix;//这是入统计队列的key

$redis = SysResource::getRedis();
$d['name']=$h5_name;
$d['add_time']=date("Y-m-d H:i:s",time());
//把统计数据入队列
$redis->lPush($key,json_encode($d));
Response::output(0,"添加成功",$key);